<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <script src="js/jquery-3.7.1.js"></script>
</head>
<body>
<p id="welcome">欢迎：</p>
  <script>
      //获取登录用户名
      var username = localStorage.getItem("user");
      $("#welcome").text("欢迎："+username)
  </script>
</body>
</html>